<template>
	<view class="allManagers u-skeleton">
		<u-navbar title="全部店长" :background="{
			'backgroundColor':'#fff'
		}" :borderBottom="false" class="u-skeleton-rect"></u-navbar>
		<div class="box-scroll" >
			<diy-scorll :Empty='managerList.length ? false : true' :status = 'status' @scrolltolower='getmanager' @refresherrefresh='refresherrefresh'>
				<view class="item" v-for="(item,index) in managerList" :key="index">
					<view class="i-title">{{item.address}}</view>
					<view class="i-info">
						<view class="i-tips">店长:</view>
						<view class="nameImage">
							<u-avatar :src="$util.img(item.avatar)" size='40'></u-avatar>
							<view class="name">{{item.nickname}}</view>
						</view>
					</view>
					<view class="i-info">
						<view class="i-tips">联系他</view>
						<view class="nameImage">
							<view class="n-item">
								<u-icon name='weixin-circle-fill' size='28' color='#42b983'></u-icon>
								<view class="context">{{item.wechat_no}}</view>
								<image :src="$util.img('/static/img/my/复制.png')" mode="widthFix" @click="copy(item.wechat_no)"></image>
							</view>
							<view class="n-item">
								<u-icon name='qq-circle-fill' size='28'  color='#2d8cf0'></u-icon>
								<view class="context">{{item.qq_no}}</view>
								<image :src="$util.img('/static/img/my/复制.png')" mode="widthFix" @click="copy(item.qq_no)"></image>
							</view>
						</view>
					</view>
				</view>
			</diy-scorll>
		</div>
		<u-skeleton :loading="loding" :animation="true" bgColor="#FFF" ></u-skeleton>
	</view>
</template>
<script>
	export default {
		data(){
			return {
				loding:true,//初始化骨架屏展示
				managerList:[] ,//店长列表
				// 列表下面文字状态
				status:'nomore',
			}
		},
		onShow() {
			this.getmanager();
		},
		methods:{
			// 下拉双薪
			refresherrefresh(callback){
				this.page = {
					page:1,
					page_size:8,
				},
				callback()
				this.getmanager(callback);
			},
			// 或许商品列表
			getmanager(callback){
				this.$http.asyncSendrequest({
					url:'/order/buyHandle',
					data:{
						goods_id:'' ,
						num:0,
						type:2
					},
					success:res=>{
						if(res.code == '0'){
							this.managerList = res.data;
							this.loding = false;
						}
						
					}
				})
			},
			// 复制数据
			copy(value){
				this.$util.copy(value,(res)=>{
					console.log("zhegn1")
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.allManagers{
		min-height: 100vh;
		.box-scroll{
			height: calc(100vh - 120rpx);
			margin-top: 30rpx;
			.item{
				min-height: 150rpx;
				background: #fff;
				border-radius: 10rpx;
				margin:0 30rpx 30rpx;
				padding: 30rpx;
				box-sizing: border-box;
				.i-title{
					font-size: 26rpx;
					margin-bottom: 20rpx;
				}
				.i-info{
					display: flex;
					align-items: center;
					margin-bottom: 20rpx;
					.i-tips{
						font-size: 26rpx;
						width: 90rpx;
						text-align: right;
						margin-right: 20rpx;
					}
					.nameImage{
						display: flex;
						align-items: center;
						.name{
							margin-left: 20rpx;
						}
						.n-item{
							width: 200rpx;
							display: flex;
							height: 40rpx;
							align-items: center;
							justify-content: space-between;
							padding: 4rpx 10rpx;
							border: 1rpx solid rgba(0,0,0,.4);
							border-radius:4rpx;
							margin-right: 20rpx;
							background: rgba(0,0,0,.1);
							.context{
								width: 100rpx;
								white-space: nowrap;
								text-overflow: ellipsis;
								overflow: hidden;
								font-size: 24rpx;
							}
							image{
								width: 30rpx;
							}
						}
					}
				}
				.i-info:last-child{
					margin-bottom: 0;
				}
			}
		}
	}
</style>